package com.hellobike.haxing.modules.order.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.hellobike.haxing.modules.order.entity.OrderDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Description: 订单明细
 * @Author: haxing-boot
 * @Date:   2020-02-08
 * @Version: V1.0
 */
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
    /**
     * 查询售后订单明细
     * @param afterId
     * @return
     */
    @Select("select d.* from t_order_aftersale_detail a,t_order_detail d where a.order_detail_id=d.id and a.order_after_id=#{afterId}")
    List<OrderDetail> queryAfterOrderDetail(Long afterId);

    /**
     * 查询订单明细
     * @param orderId
     * @return
     */
    @Select("select * from t_order_detail d where d.order_id=#{orderId}")
    List<OrderDetail> queryOrderDetail(Long orderId);
}
